<template>
	<view class="content">
		<view class='header'>
			<pagehead :title="title" :titlecolor='titlecolor' :isback='isback'></pagehead>
		</view>
		<view class='buy' >
			购买设备
		</view>
		<view class='myequipment'>
			我的设备
		</view>
		<view class='equipmentlist'>
			<view class='equipment'>
				<view class='address'>
					<view class='icon'>
						<image src="../../static/images/location.png" mode="widthFix"></image>
					</view>
					<view class='info'>
						<view class='tip'>设备地址</view>
						<view class='addresstext'>陕西省西安市未央区高山流水小区</view>
					</view>
				</view>
				<view class='circleboxs'>
					<view class='circlebox'>
						<view class='bigcircle'>
							<view class="container">
								<view class="battery">
								</view>
								<view class="battery-copy">
									<view class="g-wave"></view>
									<view class="g-wave"></view>
									<view class="g-wave"></view>
								</view>
								<view class='num'>
									26.38
								</view>
							</view>
						</view>
						<view class='type'>纸箱状态</view>
					</view>
					<view class='circlebox '>
						<view class='bigcircle redcircle'>
							<view class='smallcircle'>
								已满
							</view>
						</view>
						<view class='type'>瓶子状态</view>
					</view>
				</view>
				<view class='equipmentstatus'>
					<view class='statustext'>
						设备状态: <text> 在线</text>
					</view>
					<view class='next'>
						<image src="/static/images/next.png" mode=""></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 页面标题
				title: '设备中心',
				titlecolor: 'white',
				isback: false,
				// 饼状图


			}
		},
		onReady() {

		},
		methods: {


		}
	}
</script>

<style lang='less' scoped>
	.content {
		background-color: #F2F2F2;
		min-height: 100vh;

		.header {
			background-image: url('../../static/images/equipment.png');
			background-size: 100% 100%;
		}

		.buy {
			width: 686rpx;
			line-height: 70rpx;
			text-align: center;
			margin: 0px auto;
			border-radius: 35rpx;
			font-size: 32rpx;
			color: #2F70F1;
			border: 2rpx solid #2F70F1;
			margin-top: 61rpx;
		}

		.myequipment {
			width: 686rpx;
			line-height: 70rpx;
			margin: 0px auto;
			color: #212121;
			font-size: 30rpx;
			margin-top: 40rpx;
		}

		.equipmentlist {
			margin-top: 30rpx;

			.equipment {
				width: 686rpx;
				margin: 0px auto;
				border-radius: 30rpx;
				background-color: #fff;
				box-sizing: border-box;
				padding: 26rpx 30rpx;

				.address {
					display: flex;

					.icon {
						image {
							width: 31rpx;
							margin-top: 20rpx;
						}
					}

					.info {
						margin-left: 30rpx;

						.tip {
							font-size: 30rpx;
							color: #212121;
						}

						.addresstext {
							color: #515151;
							font-size: 28rpx;
						}
					}
				}

				.circleboxs {
					margin-top: 50rpx;
					display: flex;

					.circlebox {
						width: 50%;

						.bigcircle {
							width: 150rpx;
							height: 150rpx;
							padding: 10rpx;
							background-color: #2F70F1;
							border-radius: 50%;
							margin: 0px auto;

							.num {
								position: absolute;
								left: 0rpx;
								top: 30rpx;
								z-index: 10;
								text-align: center;
								width: 150rpx;
								color: #2F70F1;
								font-size: 36rpx;
							}

							.smallcircle {
								width: 150rpx;
								height: 150rpx;
								background: linear-gradient(to top, #FF2C61 0%, #FF507C 50%, #FF6E93 100%);
								border-radius: 50%;
								border: 4rpx solid #fff;
								box-sizing: border-box;
								text-align: center;
								line-height: 142rpx;
								color: #fff;
							}

						}

						.redcircle {
							background-color: #FF3A79;
						}

						.type {
							text-align: center;
							margin-top: 40rpx;
							color: #515151;
							font-size: 28rpx;
						}
					}

				}

				.equipmentstatus {
					margin-top: 48rpx;
					display: flex;
					justify-content: space-between;
					padding: 10rpx 0rpx;

					.statustext {
						font-size: 30rpx;
						line-height: 40rpx;
						color: #212121;

						text {
							color: #2F70F1;
						}
					}

					.next {
						image {
							width: 14rpx;
							height: 26rpx;
							margin-top: 7rpx;
						}

					}
				}
			}
		}

	}

	.container {
		position: relative;
		width: 150rpx;
		margin: auto;
		border-radius: 50%;
	}



	.battery-copy {
		position: absolute;
		top: 0;
		left: 0;
		height: 150rpx;
		width: 150rpx;
		border-radius: 15px 15px 5px 5px;
		border-radius: 50%;
		border: 10rpx border #fff;
		overflow: hidden;
	}

	.battery {
		position: relative;
		height: 150rpx;
		box-sizing: border-box;
		border-radius: 15px 15px 5px 5px;
		background: #fff;
		z-index: 1;
		border-radius: 50%;
		overflow: hidden;
		box-sizing: border-box;
		border: 4rpx solid #fff;

		&::after {
			content: "";
			position: absolute;
			left: 0;
			right: 0;
			bottom: 0;
			top: 50%;
			background: linear-gradient(to top, #337FF2 0%, #46C0FC 50%, #fff 100%);
			border-radius: 0px 0px 5px 5px;
			box-shadow: 0 14px 28px rgba(33, 150, 243, 0), 0 10px 10px rgba(9, 188, 215, 0.08);
		}

	}

	.g-wave {
		position: absolute;
		width: 230rpx;
		height: 230rpx;
		background: rgba(255, 255, 255, 1);
		border-radius: 42% 47% 44% 42%;
		bottom: 25px;
		left: 50%;
		transform: translate(-50%, -100px) rotate(720deg);
		z-index: 1;
		animation: move 10s linear infinite;
	}

	.g-wave:nth-child(2) {
		border-radius: 40% 46% 43% 47%;
		transform: translate(-50%, 0) rotate(-135deg);
	}

	.g-wave:nth-child(3) {
		border-radius: 46% 46% 37% 40%;
		transform: translate(-50%, 0) rotate(135deg);
	}

	@keyframes charging {
		50% {
			box-shadow: 0 14px 28px rgba(0, 150, 136, 0.83), 0px 4px 10px rgba(9, 188, 215, 0.4);
		}

		95% {
			top: 5%;
			filter: hue-rotate(0deg);
			border-radius: 0 0 5px 5px;
			box-shadow: 0 14px 28px rgba(4, 188, 213, .2), 0 10px 10px rgba(9, 188, 215, 0.08);
		}

		100% {
			top: 0%;
			filter: hue-rotate(0deg);
			border-radius: 15px 15px 5px 5px;
			box-shadow: 0 14px 28px rgba(4, 188, 213, 0), 0 10px 10px rgba(9, 188, 215, 0.4);
		}
	}

	@keyframes move {

			0%{
			 transform: translate(-50%, 0rpx) rotate(0deg);
		}
		100% {
			transform: translate(-50%, 0px) rotate(720deg);
		}
	}
</style>
